﻿using System;
using System.Collections.Generic;

namespace mvcForum.Core.Interfaces.Services {

	public interface IMembershipService {
		Boolean CreateAccount(String accountName, String password, String emailAddress, out String errorMessage);
		void UnlockAccount(String accountName);
		IAccount GetAccount(Object id);
		//IAccount GetAccount(Boolean online);
		IAccount GetAccountByName(String accountName);
		IAccount GetAccountByName(String accountName, Boolean online);
		String GetAccountNameByEmailAddress(String emailAddress);
		IAccount GetAccountByEmailAddress(String emailAddress);
		void UpdateAccount(IAccount account);
		void DeleteAccount(String accountName);
		void DeleteAccount(String accountName, Boolean deleteAllRelatedData);

		Boolean ValidateAccount(String accountName, String password);

		IEnumerable<IAccount> GetAllAccounts(Int32 page, Int32 pageSize, out Int32 total);

		void CreateRole(String roleName);
		//String[] GetRolesForAccount();
		String[] GetAllRoles();
		Boolean IsAccountInRole(String accountName, String roleName);
		String[] GetRolesForAccount(String accountName);
		void RemoveAccountFromRoles(String accountName, String[] roles);
		void AddAccountToRoles(String accountName, String[] roles);

		String ResetPassword(IAccount account);
		Boolean ChangePassword(IAccount account, String oldPassword, String newPassword);
	}
}